package com.admin.controller;

import com.common.domain.entity.Point;
import com.common.domain.entity.ResponseResult;
import com.common.service.PointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("system/point")
public class PointController {
    @Autowired
    private PointService pointService;

    @GetMapping("list")
    public ResponseResult allPointList(Integer pageNum, Integer pageSize, String userName, String type){
        return pointService.allPointList(pageNum,pageSize,userName,type);
    }

    @PostMapping("/insertPoint")
    public ResponseResult insertPoint(@RequestBody Point point){
        return pointService.insertPoint(point);
    }

    @DeleteMapping("{ids}")
    public ResponseResult deleteRole(@PathVariable String ids){
        return pointService.deleteRole(ids);
    }


}
